drive to analyze. Device resources: You can see that the Speak and handphone GPIO are given the Rk30_pin2_pd7 . static struct Rk616_platform_data Rk616_pdata = {. Power_init = Rk616_power_on_init,. Power_deinit = Rk616_power_deinit,. scl_rate = Rk616_scl_rate,. Lcd0_func = input,//port lcd0 as input. Lcd1_func = input,//port lcd1 as input. LVDS_CH_NR = 1,//the number of used LVDS channel. HDMI_IRQ = Rk30_pin2_pd6,. Spk_ctl_gpio = Rk30_pin2_pd7 ,. Hp_ctl_gpio = Rk30_pin2_pd7 ,};Functions for c
switched normally, it means that the upper layer has already called the corresponding interface. From the drive to analyze. Equipment resources: Can see Speak and handphone of the Enable GPIO all give is Rk30_pin2_pd7 . static struct Rk616_platform_data Rk616_pdata = {. Power_init = Rk616_power_on_init,. Power_deinit = Rk616_power_deinit,. scl_rate = Rk616_scl_rate,. Lcd0_func = input,//port lcd0 as input. Lcd1_func = input,//port lcd1 as input. LVDS_CH_NR = 1,//the number of used LVDS channel
Then, the get callback function can be implemented as follows:
Static int snd_sbmixer_get_single (struct snd_kcontrol * kcontrol,Struct snd_ctl_elem_value * ucontrol)
{Int Reg = kcontrol-> private_value 0xff;Int shift = (kcontrol-> private_value> 16) 0xff;Int mask = (kcontrol-> private_value> 24) 0xff;....
// Read the value of the corresponding register based on the above values and fill in the value}
If the Count field of control is greater th
corresponding register, the displacement value, the maximum value, and whether it is logically reversed, and the control's put callback function and get callback function need to use this structure to access the actual registers. Let's look at the definition of the get callback function:[CPP] View Plain copy INTNBSP;SND_SOC_GET_VOLSW (structsnd_kcontrol*kcontrol, structsnd_ctl_elem_value*ucontrol) { structsoc_mixer_control*mc= (structsoc_ mixer_
Contact Us
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.